package com.tax.controller;

import com.tax.config.response.Response;
import com.tax.dto.req.SmsCodeReq;
import com.tax.service.ISmsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * FileName: SmsController
 * Author:   duandehui
 * Date:     2023/3/4 16:04
 * Description: 短信验证码
 */
@RestController
@RequestMapping("/sms")
@Api(tags = "短信验证码")
public class SmsController {

    @Autowired
    private ISmsService smsService;

    /**
     * 用户获取验证码
     */
    @ApiOperation(value="输入手机号码获取验证码",notes = "输入手机号码获取验证码")
    @RequestMapping(path = "/v1/verification_code/send",method = RequestMethod.GET)
    public Response verificationCodeSend(@Validated SmsCodeReq smsCodeParam){
        return smsService.verificationCodeSend(smsCodeParam);
    }
}
